package top.huhuiyu.ds.sort;

import java.io.Serializable;

/**
 * 对象相等演示对象
 * 
 * @author Aiden Pearce
 *
 */
public class EqEntity implements Serializable {

  private static final long serialVersionUID = -6503688624477244697L;
  private int eid;
  private String info;
  
  public EqEntity() {
  }
  
  

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + eid;
    result = prime * result + ((info == null) ? 0 : info.hashCode());
    return result;
  }



  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    EqEntity other = (EqEntity) obj;
    if (eid != other.eid)
      return false;
    if (info == null) {
      if (other.info != null)
        return false;
    } else if (!info.equals(other.info))
      return false;
    return true;
  }



  public EqEntity(int eid, String info) {
    this.eid = eid;
    this.info = info;
  }

  public int getEid() {
    return eid;
  }

  public void setEid(int eid) {
    this.eid = eid;
  }

  public String getInfo() {
    return info;
  }

  public void setInfo(String info) {
    this.info = info;
  }

  @Override
  public String toString() {
    return "EqEntity [eid=" + eid + ", info=" + info + "]";
  }
  
  
}
